﻿<%@ Page Language="C#" MasterPageFile="~/GestorEventos.master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GestorEventos.WebForm2" Title="Untitled Page" %>

<%@ Import Namespace="Business" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="UserArea" runat="server">
   
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Main" runat="server">
<asp:Label Font-Size="Large" ID="Label1" runat="server" Text="Eventos mais vistos" 
            style="color: #FF9900; font-size: x-large"> </asp:Label>
            <hr />
            <br />
            <br />
    

<% 
    
    ListaEvento business = new ListaEvento();
    ListaEvento listaEventos = new ListaEvento(business.getTopTen());


    
    for (int i = 0; i < listaEventos.getListaEventos().Count; i++) { %>
    <table>
    <tr>
        <td>
            <asp:HyperLink ID="HyperLinkEvento" runat="server"></asp:HyperLink>
            <% HyperLinkEvento.Text = listaEventos.getListaEventos()[i].getNome();%>
            <% HyperLinkEvento.NavigateUrl = "showEvento.aspx?eventID=" + listaEventos.getListaEventos()[i].getID() + "";%>
        </td>
        
        <td>
            
        </td>
    
    </tr>
    </table>
    <hr />    
    
    <%
    }
    
     %>


</asp:Content>
